"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.http import HttpResponse
from django.urls import path
from django.views.generic import TemplateView

from newsblog import views

# 删除数据库最简单有效的方法，
# 把models的初始化注释掉，把admin的相关内容注释掉，重新 python manage.py makemigrations   重新 python manage.py migrate 就会生成新表
urlpatterns = [
    path('admin/', admin.site.urls),
    path('index/', views.index, name='index'),              #主页
    path('', views.index),   #zhuy123e123
    path('backindex/', views.backindex, name='mainindex'),   #返回www主页


    path('backindex/', views.backindex, name='mainindex'), # 来源关键词解析

    path('upload/', views.upload, name='upload'),  # 关键词txt上传

    path('imgupload/', views.imgupload, name='imgupload'),  # 关键词txt上传
    path('cleartxt/', views.cleartxt, name='cleartxt'),  # 关键词txt上传
    path('clearzhizhutxt/', views.clearzhizhutxt, name='clearzhizhutxt'),  # 关键词txt上传


    # url(r'^robots\.txt$', lambda r: HttpResponse('User-agent: *\nDisallow: /admin', content_type='text/plain')),
    url(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')),
    url(r'^sogousiteverification\.txt$', TemplateView.as_view(template_name='sogousiteverification.txt', content_type='text/plain')),
    url(r'^robots$', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')),
    path('sitemap/', views.allpinyin_keywords_list, name='sitemap'),  # 网站地图webmap
    url(r'^sitemap\.xml/$', TemplateView.as_view(template_name='sitemap.xml',content_type='text/xml')),
    url(r'^sitemap\.txt$', TemplateView.as_view(template_name='sitemap.txt', content_type='text/plain')),

    #京东验证文件123
    url(r'^jd_root\.txt$', TemplateView.as_view(template_name='jd_root.txt', content_type='text/plain')),
    url(r'^tkindex\.php', TemplateView.as_view(template_name='tkindex.php', content_type='text/plain')),



    #admintoos工具，查看蜘蛛以及用户访问动态
    # url(r'^admintoos/', TemplateView.as_view(template_name='admintoos.html', content_type='text/html')),

    path('admingetpost/', views.getpost, name='getpost'),  #在远程接收数据存储到static\\KEYLOG\\keywordlog.txt



    path('tbzhushop/', views.tbzhushop, name='shoplist'),  # 评论功能

    path('editor/', views.editor, name='editor'),  # 编辑器页面存档
    path('shiyan/', views.shiyan, name='shiyan'),  # 编辑器页面存档
    path('vipvideo/', views.vipvideo, name='player'),  # 前端页面按钮获取商品id
    path('playlist/', views.playlist, name='playlist'),  # 前端页面按钮获取商品id




    # """web URL Configuration
    #     #           工具栏内容
    #     # 1新浪博客内容编辑器   {% url 'makevip' %}
    #     # 2查券客服单页         {% url 'ewm' %}
    #     # 3淘宝评论生成系统     {% url 'tbpinglun' %}
    #     # 4蜘蛛访问记录查询     {% url 'admin123' %}
    #     # """
    path('vip/', views.vip, name='vip'),  # vip功能页面
    path('makevip/', views.makevip, name='makevip'),  # 建设 话术库
    path('ewm/', views.ewm, name='ewm'),  # 查券客服
    path('tbpinglun/', views.tbpinglun, name='tbpinglun'),  # 编辑器页面存档
    path('admin123/', views.admin123, name='admin123'),  # 网站地图webmap
    path('initedit/', views.initedit, name='initedit'),  # 研究froala 功能实验室
    path('codefenxi1/', views.codefenxi1, name='codefenxi1'),  # 研究froala 功能实验室
    path('codefenxi2/', views.codefenxi2, name='codefenxi2'),  # 研究froala 功能实验室




]
